<%-- 
    Document   : modifroom
    Created on : 24-jun-2013, 0:03:15
    Author     : juli
--%>

<%@page import="model.Room"%>
<%@page import="beans.Dao"%>
<%@page import="java.util.List"%>
<%@taglib prefix="t" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="CSS/style.css"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Modify a Meeting Room</title>
    </head>
    <body id="css-zen-garden">
        <div class="page-wrapper">
            <section class="intro"> 
                <div class="preamble" id="zen-resources">
                    <p>Modify a Meeting Room</p>
                     <p style="color: #ff0000">${sessionScope['error']}</p>
                    <form action="ModifyRoom" method="post">
                      <p>Select a room by name:</p><br>
                   <%
                  List<Room> lista = Dao.getRooms();
                  out.println("<select name='room'>");
                  out.println("<option selected>--- Select a room ---</option>");

                    for (int i=0;i<lista.size();i++)
                    {
                       out.println("<option>"+lista.get(i).getName()+"</option>");
                    }
                  out.println("</select>");
                    %>
                        <p> Name: <input type="text" name="name"></p>
                        <p> Place: <input type="text" name="place"></p>
                        <p> Capacity: <input type="text" name="capacity"></p>  
                        <p><textarea NAME="caracteristics" ROWS=10 COLS=54>Rest of characteristics of the Meeting Room...</textarea></p>
                        <p><input type="submit" value="Entrar"></p>
                    </form>
                </div>
            </section>
        </div>
    </body>
</html>
